<!--  -->
<template>
  <div class="nav">
    <NavItem v-for="item in items" :key="item.url" :item='item' :basePath='item.url'></NavItem>
  </div>
</template>

<script>
import  NavItem from './NavItem.vue'
export default {
  name: "Nav",
  components:{
    NavItem
  },
  data() {
    return {
      items: [
        {
          name: "首页",
          url: "/index",
        },
        {
          name: "数据管理",
          url: "/datamanger",
        },
        {
          name: "信息管理",
          url: "/infomanger",
          child: [
            {
              name: "列表展示",
              url: "/infomanger/listmanger",
            },
          ],
        },
        {
          name: "用户管理",
          url: "/rolemanger",
          child: [
            {
              name: "用户统计",
              url: "/rolemanger/useradd",
            },
            {
              name: "角色统计",
              url: "/rolemanger/roleadd",
            },
          ],
        },
      ],
    };
  },
};
</script>

<style scoped>
</style>